<!--点赞数量-->
<template>
 <span>{{count}}</span>
</template>

<script>
import StorageKeys from '@/common/const/StorageKeys'
export default {
  name: "likedCount",
  props: ["newsId"],
  data() {
    return {
      count: 0,
    }
  },
  created () {
    this.fetchData()
  },
  activated () {
    this.fetchData()
  },
  methods: {
    fetchData () {
      this.fetchService.contentPageDetail(this.newsId).then(res => {
        if (res.code === 0) {
         this.count = res.data.newsContent.ups
        }
      })
    }
  },
};
</script>
<style scoped lang="scss">
@import "@/common/stylus/moon.scss";
.icon-like{
  width: pxToRem(24px);
  display: inline-block;
  img{
    width: 100%;
    position: relative;
    top: 3px;
  }
}
</style>
